package com.code.entity.composite;

/**
 * 叶子节点
 */
public class PomNodeItem extends NodeComponent {

    protected String key;

    protected String value;

    public PomNodeItem(String key, String value) {
        this.key = key;
        this.value = value;
    }

    @Override
    public String build(String nbsp) {
        StringBuilder builder = new StringBuilder();
        builder.append(nbsp).append("<").append(key).append(">").append(value).append("</").append(key).append(">");
        return builder.toString();
    }
}
